<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Memeber Level</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="__PUBLIC__/Js/Base.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/prototype.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/mootools.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/Ajax/ThinkAjax.js"></script>
<link href="__PUBLIC__/css/skin.css" rel="stylesheet" type="text/css" />
 <script language="JavaScript">
 <!--
	function add(){
		window.location.href="__URL__/add";
	}
	function edit(id){
		window.location.href="__URL__/edit/id/"+id;
	}
	function del(id){
		if (confirm("尼玛，确定删除吗？"))
		ThinkAjax.send('__URL__/delete','ajax=1&id='+id,complete,'result');
	}
	function complete(data,status){
		if (status==1)
		{
			alert("操作成功");
			window.location.href="__URL__";
		}
	}
 //-->
 </script>
</head>
<body>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<!-- 页面顶部标题栏 -->
		<tr>
			<td width="935" valign="top" background="__PUBLIC__/images/content-bg.gif" colspan="2">
				<table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
					<tr>
						<td height="31"><div class="titlebt">会员级别列表</div></td>
					</tr>
				</table>
			</td>
			<td width="16" valign="top" background="__PUBLIC__/images/mail_rightbg.gif">&nbsp;</td>
		</tr>

		<tr>
			<td>
				<form id="listForm" name="listForm" method="POST" action="__URL__/insert">
					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="nowtable">
						<tr>
							<th>编号</th>
							<th>名称</th>
							<th>已消费金额(单位:美元)</th>
							<th>操作</th>
						</tr>
						<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><tr <?php if(($mod)  ==  "0"): ?>bgcolor="#f2f2f2"<?php endif; ?> <?php if(($mod)  ==  "1"): ?>bgcolor="#FFFFFF"<?php endif; ?>>
								<td width="20%" height="30" align="center"  class="left_txt2"><?php echo ($i); ?></td>
								<td width="3%" align="center" ><a href="#" onClick="edit(<?php echo ($vo["id"]); ?>)"><?php echo ($vo["level_name"]); ?></a></td>
								<td width="32%" height="30" align="right" ><?php echo ($vo["amount"]); ?></td>
								<td width="32%" height="30" align="center" ><a href="javascript:del(<?php echo ($vo["id"]); ?>);" >删除</a></td>
							</tr><?php endforeach; endif; else: echo "" ;endif; ?>
						<tr>
							<td width="50%" height="30" align="center" colspan="4">
								<input type="button" onclick="add();" value="新增" name="B1" />
								&nbsp;&nbsp;&nbsp; 
								<input type="reset" value="Reset" name="B12" />
							</td>
						</tr>
					</table>
				</form>
			</td>
		</tr>
	</table>
	</td>
	</tr>
	</table>
</body>
</html>